\(\int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx\) [17]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 122 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\frac {d^2 x}{4 a f^2}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \coth (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))} \]

[Out]

1/4*d^2*x/a/f^2+1/4*(d*x+c)^2/a/f+1/6*(d*x+c)^3/a/d-1/4*d^2/f^3/(a+a*coth(f*x+e))-1/2*d*(d*x+c)/f^2/(a+a*coth(
f*x+e))-1/2*(d*x+c)^2/f/(a+a*coth(f*x+e))

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3804, 3560, 8} \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=-\frac {d (c+d x)}{2 f^2 (a \coth (e+f x)+a)}-\frac {(c+d x)^2}{2 f (a \coth (e+f x)+a)}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a \coth (e+f x)+a)}+\frac {d^2 x}{4 a f^2} \]

[In]

Int[(c + d*x)^2/(a + a*Coth[e + f*x]),x]

[Out]

(d^2*x)/(4*a*f^2) + (c + d*x)^2/(4*a*f) + (c + d*x)^3/(6*a*d) - d^2/(4*f^3*(a + a*Coth[e + f*x])) - (d*(c + d*
x))/(2*f^2*(a + a*Coth[e + f*x])) - (c + d*x)^2/(2*f*(a + a*Coth[e + f*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3560

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a*((a + b*Tan[c + d*x])^n/(2*b*d*n)), x] +
Dist[1/(2*a), Int[(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0]

Rule 3804

Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + d*x)^(m + 1)/(2*
a*d*(m + 1)), x] + (Dist[a*d*(m/(2*b*f)), Int[(c + d*x)^(m - 1)/(a + b*Tan[e + f*x]), x], x] - Simp[a*((c + d*
x)^m/(2*b*f*(a + b*Tan[e + f*x]))), x]) /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0] && GtQ[m, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(c+d x)^3}{6 a d}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}+\frac {d \int \frac {c+d x}{a+a \coth (e+f x)} \, dx}{f} \\ & = \frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}+\frac {d^2 \int \frac {1}{a+a \coth (e+f x)} \, dx}{2 f^2} \\ & = \frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \coth (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}+\frac {d^2 \int 1 \, dx}{4 a f^2} \\ & = \frac {d^2 x}{4 a f^2}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \coth (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.59 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.39 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\frac {\text {csch}(e+f x) (\cosh (f x)+\sinh (f x)) \left (\left (2 c^2 f^2+2 c d f (1+2 f x)+d^2 \left (1+2 f x+2 f^2 x^2\right )\right ) \cosh (2 f x) (\cosh (e)-\sinh (e))+\frac {4}{3} f^3 x \left (3 c^2+3 c d x+d^2 x^2\right ) (\cosh (e)+\sinh (e))+\left (2 c^2 f^2+2 c d f (1+2 f x)+d^2 \left (1+2 f x+2 f^2 x^2\right )\right ) (-\cosh (e)+\sinh (e)) \sinh (2 f x)\right )}{8 a f^3 (1+\coth (e+f x))} \]

[In]

Integrate[(c + d*x)^2/(a + a*Coth[e + f*x]),x]

[Out]

(Csch[e + f*x]*(Cosh[f*x] + Sinh[f*x])*((2*c^2*f^2 + 2*c*d*f*(1 + 2*f*x) + d^2*(1 + 2*f*x + 2*f^2*x^2))*Cosh[2
*f*x]*(Cosh[e] - Sinh[e]) + (4*f^3*x*(3*c^2 + 3*c*d*x + d^2*x^2)*(Cosh[e] + Sinh[e]))/3 + (2*c^2*f^2 + 2*c*d*f
*(1 + 2*f*x) + d^2*(1 + 2*f*x + 2*f^2*x^2))*(-Cosh[e] + Sinh[e])*Sinh[2*f*x]))/(8*a*f^3*(1 + Coth[e + f*x]))

Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.84

method result size
risch \(\frac {d^{2} x^{3}}{6 a}+\frac {d c \,x^{2}}{2 a}+\frac {c^{2} x}{2 a}+\frac {c^{3}}{6 d a}+\frac {\left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}+2 d^{2} f x +2 c d f +d^{2}\right ) {\mathrm e}^{-2 f x -2 e}}{8 a \,f^{3}}\) \(103\)
parallelrisch \(\frac {\left (\left (2 d^{2} x^{3}+6 d c \,x^{2}+6 c^{2} x \right ) f^{3}+\left (-3 x^{2} d^{2}-6 c d x -6 c^{2}\right ) f^{2}+\left (-3 x \,d^{2}-6 c d \right ) f -3 d^{2}\right ) \tanh \left (f x +e \right )+6 x \left (\left (\frac {1}{3} x^{2} d^{2}+c d x +c^{2}\right ) f^{2}+d \left (\frac {d x}{2}+c \right ) f +\frac {d^{2}}{2}\right ) f}{12 f^{3} a \left (1+\tanh \left (f x +e \right )\right )}\) \(134\)
derivativedivides \(\frac {-c^{2} f^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )+2 d e c f \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )-2 d c f \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )-d^{2} e^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )+2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )-d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )+\frac {\cosh \left (f x +e \right )^{2} c^{2} f^{2}}{2}-\cosh \left (f x +e \right )^{2} d e c f +2 c d f \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )+\frac {\cosh \left (f x +e \right )^{2} d^{2} e^{2}}{2}-2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )+d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right )^{2}}{2}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}+\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{3} a}\) \(449\)
default \(\frac {-c^{2} f^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )+2 d e c f \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )-2 d c f \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )-d^{2} e^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )+2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )-d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )+\frac {\cosh \left (f x +e \right )^{2} c^{2} f^{2}}{2}-\cosh \left (f x +e \right )^{2} d e c f +2 c d f \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )+\frac {\cosh \left (f x +e \right )^{2} d^{2} e^{2}}{2}-2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )+d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right )^{2}}{2}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}+\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{3} a}\) \(449\)

[In]

int((d*x+c)^2/(a+a*coth(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/6*d^2/a*x^3+1/2*d/a*c*x^2+1/2/a*c^2*x+1/6/d/a*c^3+1/8*(2*d^2*f^2*x^2+4*c*d*f^2*x+2*c^2*f^2+2*d^2*f*x+2*c*d*f
+d^2)/a/f^3*exp(-2*f*x-2*e)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.57 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\frac {{\left (4 \, d^{2} f^{3} x^{3} + 6 \, c^{2} f^{2} + 6 \, c d f + 6 \, {\left (2 \, c d f^{3} + d^{2} f^{2}\right )} x^{2} + 3 \, d^{2} + 6 \, {\left (2 \, c^{2} f^{3} + 2 \, c d f^{2} + d^{2} f\right )} x\right )} \cosh \left (f x + e\right ) + {\left (4 \, d^{2} f^{3} x^{3} - 6 \, c^{2} f^{2} - 6 \, c d f + 6 \, {\left (2 \, c d f^{3} - d^{2} f^{2}\right )} x^{2} - 3 \, d^{2} + 6 \, {\left (2 \, c^{2} f^{3} - 2 \, c d f^{2} - d^{2} f\right )} x\right )} \sinh \left (f x + e\right )}{24 \, {\left (a f^{3} \cosh \left (f x + e\right ) + a f^{3} \sinh \left (f x + e\right )\right )}} \]

[In]

integrate((d*x+c)^2/(a+a*coth(f*x+e)),x, algorithm="fricas")

[Out]

1/24*((4*d^2*f^3*x^3 + 6*c^2*f^2 + 6*c*d*f + 6*(2*c*d*f^3 + d^2*f^2)*x^2 + 3*d^2 + 6*(2*c^2*f^3 + 2*c*d*f^2 +
d^2*f)*x)*cosh(f*x + e) + (4*d^2*f^3*x^3 - 6*c^2*f^2 - 6*c*d*f + 6*(2*c*d*f^3 - d^2*f^2)*x^2 - 3*d^2 + 6*(2*c^
2*f^3 - 2*c*d*f^2 - d^2*f)*x)*sinh(f*x + e))/(a*f^3*cosh(f*x + e) + a*f^3*sinh(f*x + e))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 522 vs. \(2 (95) = 190\).

Time = 0.63 (sec) , antiderivative size = 522, normalized size of antiderivative = 4.28 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\begin {cases} \frac {6 c^{2} f^{3} x \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c^{2} f^{3} x}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c^{2} f^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f^{3} x^{2} \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f^{3} x^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} - \frac {6 c d f^{2} x \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f^{2} x}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {2 d^{2} f^{3} x^{3} \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {2 d^{2} f^{3} x^{3}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} - \frac {3 d^{2} f^{2} x^{2} \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {3 d^{2} f^{2} x^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} - \frac {3 d^{2} f x \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {3 d^{2} f x}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {3 d^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} & \text {for}\: f \neq 0 \\\frac {c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}}{a \coth {\left (e \right )} + a} & \text {otherwise} \end {cases} \]

[In]

integrate((d*x+c)**2/(a+a*coth(f*x+e)),x)

[Out]

Piecewise((6*c**2*f**3*x*tanh(e + f*x)/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) + 6*c**2*f**3*x/(12*a*f**3*tanh(e
 + f*x) + 12*a*f**3) + 6*c**2*f**2/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) + 6*c*d*f**3*x**2*tanh(e + f*x)/(12*a
*f**3*tanh(e + f*x) + 12*a*f**3) + 6*c*d*f**3*x**2/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) - 6*c*d*f**2*x*tanh(e
 + f*x)/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) + 6*c*d*f**2*x/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) + 6*c*d*f/(
12*a*f**3*tanh(e + f*x) + 12*a*f**3) + 2*d**2*f**3*x**3*tanh(e + f*x)/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) +
2*d**2*f**3*x**3/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) - 3*d**2*f**2*x**2*tanh(e + f*x)/(12*a*f**3*tanh(e + f*
x) + 12*a*f**3) + 3*d**2*f**2*x**2/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) - 3*d**2*f*x*tanh(e + f*x)/(12*a*f**3
*tanh(e + f*x) + 12*a*f**3) + 3*d**2*f*x/(12*a*f**3*tanh(e + f*x) + 12*a*f**3) + 3*d**2/(12*a*f**3*tanh(e + f*
x) + 12*a*f**3), Ne(f, 0)), ((c**2*x + c*d*x**2 + d**2*x**3/3)/(a*coth(e) + a), True))

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.02 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\frac {1}{4} \, c^{2} {\left (\frac {2 \, {\left (f x + e\right )}}{a f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{a f}\right )} + \frac {{\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} + {\left (2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} c d e^{\left (-2 \, e\right )}}{4 \, a f^{2}} + \frac {{\left (4 \, f^{3} x^{3} e^{\left (2 \, e\right )} + 3 \, {\left (2 \, f^{2} x^{2} + 2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} d^{2} e^{\left (-2 \, e\right )}}{24 \, a f^{3}} \]

[In]

integrate((d*x+c)^2/(a+a*coth(f*x+e)),x, algorithm="maxima")

[Out]

1/4*c^2*(2*(f*x + e)/(a*f) + e^(-2*f*x - 2*e)/(a*f)) + 1/4*(2*f^2*x^2*e^(2*e) + (2*f*x + 1)*e^(-2*f*x))*c*d*e^
(-2*e)/(a*f^2) + 1/24*(4*f^3*x^3*e^(2*e) + 3*(2*f^2*x^2 + 2*f*x + 1)*e^(-2*f*x))*d^2*e^(-2*e)/(a*f^3)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.98 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\frac {{\left (4 \, d^{2} f^{3} x^{3} e^{\left (2 \, f x + 2 \, e\right )} + 12 \, c d f^{3} x^{2} e^{\left (2 \, f x + 2 \, e\right )} + 12 \, c^{2} f^{3} x e^{\left (2 \, f x + 2 \, e\right )} + 6 \, d^{2} f^{2} x^{2} + 12 \, c d f^{2} x + 6 \, c^{2} f^{2} + 6 \, d^{2} f x + 6 \, c d f + 3 \, d^{2}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{24 \, a f^{3}} \]

[In]

integrate((d*x+c)^2/(a+a*coth(f*x+e)),x, algorithm="giac")

[Out]

1/24*(4*d^2*f^3*x^3*e^(2*f*x + 2*e) + 12*c*d*f^3*x^2*e^(2*f*x + 2*e) + 12*c^2*f^3*x*e^(2*f*x + 2*e) + 6*d^2*f^
2*x^2 + 12*c*d*f^2*x + 6*c^2*f^2 + 6*d^2*f*x + 6*c*d*f + 3*d^2)*e^(-2*f*x - 2*e)/(a*f^3)

Mupad [B] (verification not implemented)

Time = 1.97 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.52 \[ \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx=\frac {{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (12\,c^2\,x\,{\mathrm {e}}^{2\,e+2\,f\,x}+4\,d^2\,x^3\,{\mathrm {e}}^{2\,e+2\,f\,x}+12\,c\,d\,x^2\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24\,a}+\frac {\frac {{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (3\,d^2+3\,d^2\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24}+\frac {f\,{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (6\,c\,d+6\,d^2\,x+6\,c\,d\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24}+\frac {f^2\,{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (6\,c^2+6\,c^2\,{\mathrm {e}}^{2\,e+2\,f\,x}+6\,d^2\,x^2+12\,c\,d\,x\right )}{24}}{a\,f^3} \]

[In]

int((c + d*x)^2/(a + a*coth(e + f*x)),x)

[Out]

(exp(- 2*e - 2*f*x)*(12*c^2*x*exp(2*e + 2*f*x) + 4*d^2*x^3*exp(2*e + 2*f*x) + 12*c*d*x^2*exp(2*e + 2*f*x)))/(2
4*a) + ((exp(- 2*e - 2*f*x)*(3*d^2 + 3*d^2*exp(2*e + 2*f*x)))/24 + (f*exp(- 2*e - 2*f*x)*(6*c*d + 6*d^2*x + 6*
c*d*exp(2*e + 2*f*x)))/24 + (f^2*exp(- 2*e - 2*f*x)*(6*c^2 + 6*c^2*exp(2*e + 2*f*x) + 6*d^2*x^2 + 12*c*d*x))/2
4)/(a*f^3)